﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace Sublimation
{
    public class Bullet : GameObject
    {
        protected bool isFriendly;
        public bool IsFriendly
        {
            get { return this.isFriendly; }
            set { this.isFriendly = value; }
        }

        protected int damagePotential;
        public int DamagePotential
        {
            get { return this.damagePotential; }
            set { this.damagePotential = value; }
        }

        public Bullet(Game game, bool isFriendly)
            : base(game)
        {
            this.isFriendly = isFriendly;

            LoadContent();

            // make sure it loads and draws
            DrawOrder = 80;
            UpdateOrder = 50;
            Visible = true;
            Enabled = true;

            //TODO: make this real input
            Position = new Vector2(350, 350);
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            //TODO: collision detection, apply damage to hit object, movement *with slowdown and destruction?)
        }

        protected override void LoadContent()
        {
            base.LoadContent();

            Sprite = Game.Content.Load<Texture2D>("Sprites\\bullet");
        }
    }
}
